package JavaSE_core.Duo_Thread;

public class Demo2 {
	public static void main(String[] args) {
		
		Thread st=new Thread(new Runnable() {//匿名内部类
			
			public void run() {
				for (int i = 0; i <5; i++) {
					System.out.println(i);
					try {
						Thread.sleep(1000);//使当前线程睡眠指定时间，以毫秒为单位！
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
				}
			}
		});
		st.start();
	}
}
